import request from '@/utils/request'

/**
 * 全部部楼栋数据
 */
export function BuildingInformationAPI(data) {
  return request({
    method: 'get',
    url: 'house/building',
    params: data
  })
}

/**
 * 删除楼栋
 */
export function buildingDelAPI(id) {
  return request({
    method: 'DELETE',
    url: `house/building/${id}`
  })
}

/**
 * 新增楼栋
 */
export function NewBuildingAPI(data) {
  return request({
    method: 'POST',
    url: `house/building`,
    data: data
  })
}

// 下拉小区
export function getSelectHomeApi() {
  return request({
    url: '/community',
    method: 'get'
  })
}

/**
 * 单个楼栋数据
 */
export function communityParticularsAPI(id) {
  return request({
    method: 'get',
    url: `house/building/${id}`
  })
}

/**
 * 修改数据
 */
export function modifyDataAPI(data) {
  return request({
    method: 'PUT',
    url: `house/building/${data.id}`,
    data: data
  })
}
